package Operation;

import book.BookList;

public class ShowOperation implements IOperation{
    @Override
    public void work(BookList bookList) {
        System.out.println("显示所有书籍");
        int n = bookList.getBooknum();
        if(n == 0){
            System.out.println("已经没有书了！");
        }else {
            for (int i = 0; i < n; i++) {
                System.out.println(bookList.getBooks()[i]);
            }
        }
    }
}
